#ifndef FACEKEYPOINTDETECTOR_H
#define FACEKEYPOINTDETECTOR_H


#include <string>
#include <stack>
#include "ncnn/net.h"
#include <chrono>
#include <QImage>
#include <sstream>
template <class Type>
Type stringToNum(const std::string& str)
{
    std::istringstream iss(str);
    Type num;
    iss >> num;
    return num;
}
class FaceKeypointDetector
{

public:
    void Init(const std::string &model_param, const std::string &model_bin);

    FaceKeypointDetector(const std::string &model_param, const std::string &model_bin);

    inline void Release();

    void Detect(QImage& image, std::vector<float>& keypoints);

    ~FaceKeypointDetector();

public:
    std::vector<float> _keypoint_meanshape;
    float _mean_val[3];

    ncnn::Net *Net;
};

#endif // FACEKEYPOINTDETECTOR_H
